program main

    use timer_module, only: timer
    use nnps_vector, only: vector
    use seakeeping_collection_vector, only: vector1=>vector
    implicit none

    type(timer) :: tmr
    interface
        subroutine push() bind(c)
        end subroutine push
    end interface

    call tmr%tic()
    call push()
    print *, tmr%toc()

    call tmr%tic()
    call push_f()
    print *, tmr%toc()
    
    call tmr%tic()
    call push_f2()
    print *, tmr%toc()

contains

    subroutine push_f()
        type(vector) :: v
        integer :: i

        call v%init(1)
        do i = 1, 1e7
            call v%push(i)
        end do

        print *, v%len

    end subroutine push_f
    
    subroutine push_f2()
        type(vector1) :: v
        integer :: i

        call v%init()
        do i = 1, 1e7
            call v%push(i)
        end do

        print *, v%len

    end subroutine push_f2

end program main
